package com.rocky.project.model.admin;

import java.util.Set;

import com.rocky.project.model.base.BaseEntity;

/**
 * @hibernate.class table = "t_resource" dynamic-insert = "true" dynamic-update = "true"
 */
public class Resource extends BaseEntity {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2375624276755490370L;
	
	private String contextPath;	//项目路径
	private String actionName;
	
	private String namespace;	
	private String NSName;
	private String actionUrl;
	private String name;

	private String status;//new old deprecated  是否启用
	private boolean isActive = true;
	
	private String resourceType;//menu action ...
	
	private String fromFile;
	private String iconCls;	
	
	private Resource parent;
	private Set children;
	private Set roleRSet;
	
	/**
	 *  @hibernate.property column="c_actionname"  type="string"
	 */
	public String getActionName() {
		return actionName;
	}
	public void setActionName(String actionName) {
		this.actionName = actionName;
	}
	/**
	 *  @hibernate.property column="c_actionurl"  type="string"
	 */
	public String getActionUrl() {
		return actionUrl;
	}
	public void setActionUrl(String actionUrl) {
		this.actionUrl = actionUrl;
	}
	/**
	 *  @hibernate.property column="c_contextpath"  type="string"
	 */
	public String getContextPath() {
		return contextPath;
	}
	public void setContextPath(String contextPath) {
		this.contextPath = contextPath;
	}
	/**
	 *  @hibernate.property column="c_fromfile"  type="string"
	 */
	public String getFromFile() {
		return fromFile;
	}
	public void setFromFile(String fromFile) {
		this.fromFile = fromFile;
	}
	/**
	 *  @hibernate.property column="c_iconcls"  type="string"
	 */
	public String getIconCls() {
		return iconCls;
	}
	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}

	/**
	 *  @hibernate.property column="c_name"  type="string"
	 */
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	/**
	 *  @hibernate.property column="c_namespace"  type="string"
	 */
	public String getNamespace() {
		return namespace;
	}
	public void setNamespace(String namespace) {
		this.namespace = namespace;
	}
	/**
	 *  @hibernate.property column="c_ns_name"  type="string"
	 */
	public String getNSName() {
		return NSName;
	}
	public void setNSName(String name) {
		NSName = name;
	}
	



	/**
	 *  @hibernate.property column="c_resourcetype"  type="string"
	 */
	public String getResourceType() {
		return resourceType;
	}
	public void setResourceType(String resourceType) {
		this.resourceType = resourceType;
	}
	/**
	 *  @hibernate.property column="c_status"  type="string"
	 */
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	/**
	 * @hibernate.property column = "isactive" type = "boolean" 
	 * @return boolean
	 */
	public boolean isActive() {
		return isActive;
	}
	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}

	/**
	 * @hibernate.set lazy = "true" readonly = "true" cascade = "none" order-by ="showindex asc" inverse = "true"
	 * @hibernate.collection-key column = "c_parent_id"
	 * @hibernate.collection-one-to-many class ="com.rocky.project.model.admin.Resource"
	 */	
	public Set getChildren() {
		return children;
	}
	public void setChildren(Set children) {
		this.children = children;
	}
	/**
	 * @hibernate.many-to-one column = "c_parent_id" lazy = "true" class ="com.rocky.project.model.admin.Resource"
	 */
	public Resource getParent() {
		return parent;
	}
	public void setParent(Resource parent) {
		this.parent = parent;
	}
	/**
	 * @hibernate.set lazy = "true" readonly = "true" cascade = "none" inverse = "true"
	 * @hibernate.collection-key column = "c_resource_id"
	 * @hibernate.collection-one-to-many class ="com.rocky.project.model.admin.RoleResourceR"
	 */
	public Set getRoleRSet() {
		return roleRSet;
	}
	public void setRoleRSet(Set roleRSet) {
		this.roleRSet = roleRSet;
	}
	
}
